package com.easy;

/**
 * Created by Lxk on 2019/5/26.
 */
public class Solution258 {

    private Integer getAllSumDigits(int num){
        int sum = 0;
        while(num!=0){
            sum += (num%10);
            num /= 10;
        }
        return sum;
    }

    public int addDigits(int num) {
        do{
            num = getAllSumDigits(num);
        }while(num>=10);
        return num;
    }

    public static void main(String[] args) {
        int val = 5&7;
        System.out.println(val);
    }

}
